<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
    <title>JsUnit test page for file xslt.js of goog-ajaxslt</title>
    <script language="JavaScript" type="text/javascript" 
    src="http://www.jsunit.net/runner/app/jsUnitCore.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="xmltoken.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="util.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="dom.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="xpath.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="xslt.js"></script>
    <script language="JavaScript" type="text/javascript" 
    src="xslt_unittest.js"></script>
  </head>
  
  <body>
    This is a <a href="http://www.jsunit.net/">jsUnit</a> test
    page. Run it using the <a
    href="http://www.jsunit.net/runner/testRunner.html">jsUnit runner</a>.

    <!-- used in the test cases -->

<textarea id="xml">
  <all>
    <item pos="2">A</item>
    <item pos="3">B</item>
    <item pos="1">C</item>
  </all>
</textarea>

<textarea id="xslt-for-each-sort">
  <xsl:stylesheet>
    <xsl:template match="/">
      <xsl:for-each select="//item">
        <xsl:sort select="@pos"/>
        <xsl:value-of select="."/>
      </xsl:for-each>
    </xsl:template>
  </xsl:stylesheet>
</textarea>

<textarea id="xslt-for-each-sort-ascending">
  <xsl:stylesheet>
    <xsl:template match="/">
      <xsl:for-each select="//item">
        <xsl:sort select="." order="ascending"/>
        <xsl:value-of select="."/>
      </xsl:for-each>
    </xsl:template>
  </xsl:stylesheet>
</textarea>

<textarea id="xslt-for-each-sort-descending">
  <xsl:stylesheet>
    <xsl:template match="/">
      <xsl:for-each select="//item">
        <xsl:sort select="." order="descending"/>
        <xsl:value-of select="."/>
      </xsl:for-each>
    </xsl:template>
  </xsl:stylesheet>
</textarea>

  </body>
</html>